<!DOCTYPE html>
<html>
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta charset="utf-8">
    <title>获取业绩报告</title>
    <link rel="stylesheet" href="http://cdn.static.runoob.com/libs/bootstrap/3.3.7/css/bootstrap.min.css">
    <script src="http://cdn.static.runoob.com/libs/jquery/2.1.1/jquery.min.js"></script>
    <script src="http://cdn.static.runoob.com/libs/bootstrap/3.3.7/js/bootstrap.min.js"></script>
    <script src="commission.js"></script>
</head>
<body>
<?php
$getdate = $_POST['getdate'];
session_start();
$id=$_SESSION['userid'];
$name=$_SESSION['name'];
$conn = new mysqli("localhost", "root", "123", "commission");
if ($conn->connect_error) {
    die("服务器连接失败: " . $conn->connect_error);
}
$result = $conn->query("SELECT * FROM report where id = '".$id."' and date='".$getdate."'");
$row=$result->fetch_assoc();
?>
<div id="content" class="row" style="width:100%;margin-left:4%;height: 5%"></div>
<div id="content" class="row" style="width:95%;margin-left:8%;height: 5%">
    <div class="table-responsive">
        <table class="table" style="margin: 1% 0 0; width: 85%">
        <thead>
            <tr>
                <th>单号：<small><?php echo $row['number']?></small></th>
                <th>人员编号：<small><?php echo $row['id']?></small></th>
                <th>姓名：<small><?php echo $name?></small></th>
                <th>成单日期：<small><?php echo $row['date']?></small></th>
            </tr>
        </thead>
        </table>
    </div>
</div>
<div id="content" class="row" style="width:100%;margin-left:4%;height: 15%">
    <div class="table-responsive" style="background-color:#EEEEEE;width: 85%;text-align: center;">
    <table class="table">

        <tbody>
            <tr>
                <td>&nbsp;</td>
                <td>lock</td>
                <td>stock</td>
                <td>barrel</td>
            </tr>
            <tr>
                <td>The sum</td>
                <td><?php echo $row['suml']?></td>
                <td><?php echo $row['sums']?></td>
                <td><?php echo $row['sumb']?></td>
            </tr>
            <tr>
                <td>amount</td>
                <td>&nbsp;</td>
                <td><?php echo $row['amount']?>$</td>
                <td>&nbsp;</td>
            </tr>
            <tr>
                <td>Commission</td>
                <td>&nbsp;</td>
                <td><?php echo $row['commission']?>$</td>
                <td>&nbsp;</td>
            </tr>
        </tbody>
    </table>
    </div>
</div>
<?php
$conn->close();
?>
</body>
</html>